unit RelatorioClassificacaoProdutos2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UFormRelatorio, QRCtrls, QuickRpt, DB, DBTables, StdCtrls,
  ExtCtrls;

type
  TFRelatorioclassificacaoProduto = class(TFormRelatorio)
    QRLabel5: TQRLabel;
    QRLabel6: TQRLabel;
    QRBand2: TQRBand;
    QRDBText1: TQRDBText;
    QRDBText3: TQRDBText;
    QRDBText2: TQRDBText;
    QRDBText9: TQRDBText;
    QRDBText8: TQRDBText;
    QRLabel7: TQRLabel;
    procedure FormCreate(Sender: TObject);
    procedure QRBand2BeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);
    procedure QRLabel3Print(sender: TObject; var Value: String);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRelatorioclassificacaoProduto: TFRelatorioclassificacaoProduto;

implementation

uses UGeral;

{$R *.dfm}

procedure TFRelatorioclassificacaoProduto.FormCreate(Sender: TObject);
begin
  inherited;
 Q:=TQuery.Create(Self);
 //q.DatabaseName:=FPesquisaClassificacaoProdutos.QPesquisa.DatabaseName;
 q.Close;
 q.SQL.Clear;
 q.SQL.Add('Select Emp_Razao as Razao from empresa ');
 q.SQL.Add('Where Emp_Codigo = :Cod ');
 q.ParamByName('Cod').AsInteger:=Codigoempresa;
 q.Open;
 QRLNomeEmpresa.Caption:=q.fieldByname('Razao').AsString;

end;

procedure TFRelatorioclassificacaoProduto.QRBand2BeforePrint(
  Sender: TQRCustomBand; var PrintBand: Boolean);
begin
  inherited;
 if QRelatorio.FieldByName('Plano').AsString = '' then
  QRBand2.Height:=20
 else
  QRBand2.Height:=46;
end;

procedure TFRelatorioclassificacaoProduto.QRLabel3Print(sender: TObject;
  var Value: String);
begin
  inherited;
value:='';
end;

end.
